How come the [L] flag isn't working in my .htaccess file?

Posted by George Edison on Stack Overflow See other posts from Stack Overflow or by George Edison
Published on 2010-05-11T03:37:22Z Indexed on 2010/05/11 3:44 UTC
Read the original article Hit count: 156

Filed under:

Here are the rules:

<IfModule mod_rewrite.c>
RewriteEngine on

RewriteRule ^$ index.php?action=home [L]
RewriteRule ^[\w\W]*$ error.php [L]

When a page matches the first one, it is supposed to ignore any other further rules. Yet accessing / results in error.php being invoked. Commenting out the second rule works as intended - the page redirects to index.php.

What am I doing wrong?

Also: is there a better way to write the last line? It's basically a catch-all.

© Stack Overflow or respective owner

Related posts about .htaccess